﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MethodWorx.CMS.Administration;
using System.Data.Linq;
using MethodWorx.Core.Linq;

namespace MethodWorx.CMS.Linq
{
    public class LinqApplicationSettingsRepository : LinqGenericStorageRepository<ApplicationSettings>, IApplicationSettingsRepository
    {
        public LinqApplicationSettingsRepository(DataContext context)
            : base(context)
        {
        }

        #region IApplicationSettingsRepository Members

        public ApplicationSettings FindSettings()
        {
            return this.All().FirstOrDefault();
        }

        #endregion

        protected override string Type
        {
            get { return "ApplicationSettings"; }
        }
    }
}
